<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>员工工资</title>

    <!--
                {field: 'rsbShId', width: 60, title: 'ID', sort: true},
                {field: 'userNum', width: 120, title: '员工ID', sort: true},
                {field: 'userName', width: 100, title: '员工姓名'},
                {field: 'rsbMonBasepay', width: 140, title: '基本工资', sort: true},
                {field: 'rsbShAdd', title: '加班费', minWidth: 80, sort: true},
                {field: 'rsbMonEat', width: 80, title: '餐补', sort: true},
                {field: 'rsbMonTraffic', width: 80, title: '交通补贴', sort: true},
                {field: 'rsbShNocome', width: 80, title: '缺勤扣款', sort: true},
                {field: 'rsbMonPhone', width: 100, title: '通讯补贴', sort: true},
                {field: 'rsbShBeforetaxes', width: 135, title: '税前工资', sort: true},
                {field: 'rsbShAftertaxes', width: 100, title: '税后工资'},
                {field: 'rsbMonFive', width: 100, title: '五险一金'},
                {field: 'rsbShGetmoney', width: 100, title: '实际工资'},
                {field: 'rsbShNum', width: 100, title: '工资编号'},
                {field: 'date', width: 100, title: '发放时间'},
    -->
</head>
<body>

<div class="layuimini-container layuimini-page-anim">
    <div class="layuimini-main">
        <!--模糊查询表单-->
        <form class="layui-form layui-form-pane" >
            <legend>模糊信息查询</legend>
            <div style="margin: 10px 10px 10px 10px">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">员工ID</label>
                        <div class="layui-input-inline">
                            <input lay-filter="employeeID" type="text" name="employeeID" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">员工姓名</label>
                        <div class="layui-input-inline">
                            <input lay-filter="people" type="text" name="people" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn layui-btn-primary"  lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
                    </div>
                </div>
            </div>
        </form>
        <!--数据表格-->
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

    </div>
</div>

<script>
    layui.use(['form', 'table','miniPage','element'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            miniPage = layui.miniPage;

        table.render({
            elem: '#currentTableId',
            url: '/showemployeemoney',
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                {field: 'rsbShId', width: 60, title: 'ID', sort: true},
                {field: 'userNum', width: 120, title: '员工ID', sort: true},
                {field: 'userName', width: 100, title: '员工姓名'},
                {field: 'rsbMonBasepay', width: 140, title: '基本工资', sort: true},
                {field: 'rsbShAdd', title: '加班费', minWidth: 80, sort: true},
                {field: 'rsbMonEat', width: 80, title: '餐补', sort: true},
                {field: 'rsbMonTraffic', width: 80, title: '交通补贴', sort: true},
                {field: 'rsbShNocome', width: 80, title: '缺勤扣款', sort: true},
                {field: 'rsbMonPhone', width: 100, title: '通讯补贴', sort: true},
                {field: 'rsbShBeforetaxes', width: 135, title: '税前工资', sort: true},
                {field: 'rsbShAftertaxes', width: 100, title: '税后工资'},
                {field: 'rsbMonFive', width: 100, title: '五险一金'},
                {field: 'rsbShGetmoney', width: 100, title: '实际工资'},
                {field: 'rsbShNum', width: 100, title: '工资编号'},
                {field: 'date', width: 100, title: '发放时间'}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 10,
            page: true,
            skin: 'line'
        });

        /*条件查询，表格重载数据*/
        form.on('submit(data-search-btn)',function (data) {
            var result = JSON.stringify(data.field);
            table.reload('currentTableId',{
                page:{
                    curr:1
                },
                where:{
                    condition:result   /*传输的查询条件*/
                },
                url:"/showemployeemoneybycondition",
                method:"post"
            });
            return false;
        });
    });
</script>

</body>
</html>